Skip to content

[#30] Forward MCV2_Bond creation fee in E2E script#31

Merged
realproject7 merged 2 commits intomainfrom
task/30-creation-fee-fix
Mar 20, 2026
Merged

[#30] Forward MCV2_Bond creation fee in E2E script#31
realproject7 merged 2 commits intomainfrom
task/30-creation-fee-fix

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Forward {value: creationFee} on all createStoryline() calls in the E2E test script
  • Read creationFee() dynamically from MCV2_Bond at script start (currently 0.0007 ETH on Base mainnet)
  • Convert F3 (zero-fee storyline) from happy-path to revert-expectation test
  • Add creationFee() to IMCV2_Bond interface and MockBond test contract

Test plan

  • All 28 unit tests pass (forge test)
  • forge fmt --check clean
  • E2E mainnet run completes without MCV2_Bond__InvalidCreationFee revert

Fixes #30

🤖 Generated with Claude Code

- Read creationFee() from MCV2_Bond at script start
- Forward {value: creationFee} on all 5 happy-path createStoryline calls
- Convert F3 (zero-fee) from happy-path to revert-expectation test
- Use F1 storyline for F4 chainPlot test (F3 no longer creates one)
- Add creationFee() to IMCV2_Bond interface and MockBond test contract
- Remove f3StorylineId from edgeCasesF serialization

Fixes #30

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T2b Review — REQUEST CHANGES (1 issue)

The fix is clean overall: dynamic creationFee() read, all 5 happy-path calls forward the fee, F3 correctly converted to a revert-expectation test, interface and MockBond updated.

Blocking

F4 scenariosPassed++ accidentally removed — The original F4 test (chainPlot with empty title) incremented scenariosPassed after the assertion. The new code removed that increment when adjusting F4 to use idF1. F4 still validates (require(pc == 2, ...)), so it should still count. This will cause scenariosPassed in e2e-results.json to be 1 lower than expected, which could break downstream assertions.

Looks good

  • creationFee read dynamically from BOND.creationFee() (not hardcoded) — correct
  • F3 try/catch revert pattern is idiomatic Solidity
  • F4 pivot from idF3idF1 is logical since F3 no longer creates a storyline
  • f3StorylineId removed from JSON serialization — matches the plotlink verification script update
  • MockBond returns 0 — unit tests don't need a fee

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

The PR addresses the mainnet failure by reading creationFee() from MCV2_Bond and forwarding it on the storyline-creation paths that must succeed during the E2E run. The scope is focused, the interface/test updates are aligned with the script change, and GitHub checks are passing.

Findings

  • None.

Decision

Approving because the fee-forwarding fix is implemented in the right place and the PR resolves the reported MCV2_Bond__InvalidCreationFee() failure mode.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T2b re-review: F4 scenariosPassed++ restored. LGTM.

@realproject7 realproject7 merged commit 603e6e1 into main Mar 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] E2E Mainnet Script Must Forward Creation Fee on Storyline Creation

2 participants